@import url(https://fonts.googleapis.com/css?family=Open+Sans:600);

.frame{
    position: absolute;
    width: 400px;
    height: 400px;
    inset: 0;
    margin: auto;
    box-shadow: 1px 2px 10px rgba(0,0,0,0.3);
    border-radius: 2px;
    background: linear-gradient(to top right, #d2592a 0%, #fdb03a 100%);
    font-family: 'Open Sans', Arial, Helvetica, sans-serif;
    overflow: hidden;
    color: #fff;
}

.counter{
    position: absolute;
    width: 130px;
    height: 40px;
    inset: 0;
    margin: auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 2px 8px 12px rgba(0,0,0,0.1);

    .minus{
        position: absolute;
        z-index: 10;
        width: 32px;
        height: 32px;
        inset: 0;
        margin: auto;
        margin-left: 5px;
        border-radius: 50%;
        cursor: pointer;
        transition: all .3s ease-in-out;

        .line{
            position: absolute;
            height: 2px;
            width: 18px;
            inset: 0;
            margin: auto;
            background: #e26e6e;
            transition: all .3s ease-in-out;
        }

        &:hover{
            background: #e26e6e;
            .line{
                background: #fff;
            }
        }
    }

    .plus{
        position: absolute;
        width: 32px;
        height: 32px;
        z-index: 10;
        inset: 0;
        margin: auto;
        margin-right: 5px;
        border-radius: 50%;
        transition: all .3s ease-in-out;

        .line-h{
            position: absolute;
            width: 18px;
            height: 2px;
            background: #8ed273;
            inset: 0;
            margin: auto;
            transition: all .3s ease-in-out;
        }

        .line-v{
            @extend .line-h;
            height: 18px;
            width: 2px;
        }

        &:hover{
            background: #8ed273;
            .line-h,
            .line-v{
                background: #fff;
            }
        }
    }

    .number{
        position: relative;
        width: 100%;
        height: 100%;
        font-size: 20px;
        font-weight: 600;
        color: #6a85a0;
        line-height: 40px;
        text-align: center;

        span{
            display: block;
            position: absolute;
            inset: 0;
            transform-origin: 50% 50%;

            &.fadeInUp{
                animation: fadeIn .3s ease-out .15s backwards;
                transform: scale(1);
                opacity: 1;
            }
            &.fadeOutUp{
                animation: fadeOut .3s ease-in;
                transform: scale(1.4);
                opacity: 0;
            }
            &.fadeInDown{
                animation: fadeOut .3s ease-out .15s reverse backwards;
                transform: scale(1);
                opacity: 1;
            }
            &.fadeOutDown{
                animation: fadeIn .3s ease-in reverse;
                transform: scale(0.6);
                opacity: 0;
            }
        }
    }
}

@keyframes fadeIn {
    from{
        transform: scale(0.6);
        opacity: 0;
    }
    to{
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from{
        transform: scale(1);
        opacity: 1;
    }    
    to{
        transform: scale(1.4);
        scale: 0;
    }
}
